package com.example.order.api;

import com.example.order.api.fallback.StockFeignServiceFallback;
import com.example.order.common.R;
import com.example.order.pojo.Stock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description TODO
 * @Author JFeng
 * @Date 2024/4/20
 */

@FeignClient(value = "stock-seata", path = "stock",fallback = StockFeignServiceFallback.class)
public interface StockFeignService {
    @RequestMapping("/reduce")
    R<Stock> reduce(@RequestParam("productId") Integer productId);
}

